package Work;

public class Test {
    public static void main(String[] args) {
       UseCompute use =new UseCompute();
       use.useCom(new Compute() {
           @Override
           public int computer(int n, int m) {
               return n+m;
           }
       },9,8);
        use.useCom(new Compute() {
            @Override
            public int computer(int n, int m) {
                return n-m;
            }
        },9,8);
        use.useCom(new Compute() {
            @Override
            public int computer(int n, int m) {
                return n/m;
            }
        },9,8);
        use.useCom(new Compute() {
            @Override
            public int computer(int n, int m) {
                return n*m;
            }
        },9,8);


    }
}
